﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Site.Models.ClanAdmin>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Index</h2>


<table>
    <tr>
        <th>Classement</th>
        <th>Nom</th>
        <th>Nb Membres</th>
        <th>Nb Points</th>
        <th>Leader</th>
        
    </tr>

<% foreach (var item in Model) { %>
    <tr>
         <td>
            <%: Html.DisplayFor(modelItem => item.stats.STAT_RANK) %>
        </td>
                 <td>
            <%: Html.DisplayFor(modelItem => item.clans.CLAN_NAME) %>
        </td>
                 <td>
            <%: Html.DisplayFor(modelItem => item.clans.CLAN_MEMBER_COUNT) %>
        </td>
                 <td>
            <%: Html.DisplayFor(modelItem => item.stats.STAT_WONGAMES)  %>
        </td>
                 <td>
            <%: Html.DisplayFor(modelItem => item.clans.aspnet_Users.UserName) %>
        </td>
        <td>
        <div style="float:right;"  id="SingleClan" ></div>
            <%: Html.ActionLink("Details", "Details", new { id = item.clans.CLAN_ID })%>   
            <% if (item.clans.CLAN_DELETEDATE == null )  { %>  
            <%: Html.ActionLink("Delete", "Delete", new { id = item.clans.CLAN_ID })%>
            <% }  else   %>
            <%:  Html.ActionLink("Unlock", "UnLock", new { id = item.clans.CLAN_ID })%>
            
        </td>
    </tr>
<% } %>

</table>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="alerts" runat="server">
</asp:Content>
